package com.creditcmsplt.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.creditcmsplt.entity.CreditCvthpdf;

/**
 * 数据库操作DAO：cvthpdf表
 * @author leiyangjun
 *
 */
public interface CreditCvthpdfMapper{

	@Insert("INSERT INTO t_credit_cvthpdf(report_id, txtPath,pdfName,created_at,updated_at) VALUES" + 
			"(#{report_id},#{txtPath},#{pdfName},NOW(),NOW())")
	public void insertCvthpdf(@Param("report_id") Integer report_id,@Param("txtPath") String txtPath,@Param("pdfName") String pdfName);
	
	@Select("select id,report_id, txtPath,pdfName,created_at,updated_at from t_credit_cvthpdf where pdfName=#{pdfName}")
	public CreditCvthpdf getCvthpdfByPdfName(@Param("pdfName") String pdfName);
	
	@Update("update t_credit_report set convertflag=1 where report_id=#{report_id}")
	public void updateReportFlag(@Param("report_id") Integer report_id);
}
